﻿
function setdefaultAddress(id,uid) {
    loading();
    $.post('/index/shop/address_setDefault', { id: id,uid:uid}, function (res) {
        if(res){
            ok();
        }
    });
}

function selAddress(aid,id,sid,gid) {
    location.href = "/index/shop/buy?id="+id+'&sid='+sid+'&aid='+aid+'&gid='+gid;
}


function delAddress(id) {
     $.post('/index/shop/address_del', { id: id }, function (res) {
         if(res){
             ok();
         }
     });
}
function ok() {
    alert('成功！');
    location.href = location.href;
}